/**
 * synchronized 可重入性测试
 */
public class ThreadDemo_synchronized {
    public static void main(String[] args) {
        synchronized (ThreadDemo_synchronized.class) {
            System.out.println("当前主线程已经得到了锁");
            synchronized (ThreadDemo_synchronized.class) {
                System.out.println("当前主线程再次得到了锁");
            }
        }
    }
}
